bitkeeper revision 1.1159.193.2 (41a5c4ea-QO7fPUkeH3KKO5W7upn-w)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Thu, 25 Nov 2004 11:41:30 +0000 (11:41 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Thu, 25 Nov 2004 11:41:30 +0000 (11:41 +0000)
Fix 'make dist' to install in xen install dir and
not remake gc every time.

tools/vnet/Makefile
tools/vnet/vnet-module/00README
tools/vnet/vnet-module/Makefile
tools/vnet/vnet-module/Makefile-2.4
tools/vnet/vnet-module/Makefile-2.6
tools/vnet/vnet-module/Makefile.ver

index 346adb99d3b4e0fda67a7fed0837e4cd1db0da1c..1eddeb44cc6d149d8add2ccf24550f2b4502cb21 100644 (file)
@@ -1,5 +1,13 @@
 
-export LINUX_RELEASE ?=2.6
+export LINUX_SERIES ?=2.6
+
+# Root path to install in.
+# Set to '/' to install relative to filesystem root.
+export prefix?=$(shell cd ../../dist/install && pwd)
+
+.PHONY: all compile
+.PHONY: gc-install gc-clean gc-prstine
+.PHONY: vnetd vnet-module install dist clean pristine
 
 all: compile
 
@@ -12,8 +20,12 @@ gc: gc.tar.gz
        tar xfz gc.tar.gz
        ln -sf gc?.? gc
 
-gc-install: gc
-       (cd gc && ./configure --prefix=`pwd`/install && make && make install)
+gc/Makefile:
+       (cd gc && ./configure --prefix=`pwd`/install)
+
+gc-install: gc gc/Makefile
+       make -C gc
+       make -C gc install
 
 gc-clean:
        -$(MAKE) -C gc clean
@@ -21,8 +33,6 @@ gc-clean:
 gc-pristine:
        -rm -rf gc?.? gc
 
-.PHONY: vnetd vnet-module install dist clean
-
 vnetd: gc-install
        $(MAKE) -C vnetd
 
@@ -35,8 +45,10 @@ install: compile
        $(MAKE) -C examples install
 
 dist: $(TARGET)
-       $(MAKE) prefix=`pwd`/../../install dist=yes install
+       $(MAKE) install
 
 clean:
        -$(MAKE) -C vnetd clean
        -$(MAKE) -C vnet-module clean
+
+pristine: clean gc-pristine
index 8dfaf00bbd6942ade2882fc2cee5654280b68a4b..3a798985b3bc9e0c47852460a03248224fb75c5a 100644 (file)
@@ -6,36 +6,34 @@ The vnet module can be compiled for 2.4 or 2.6 series kernels.
 The makefiles  use the following variables, which
 can be set in your env or on the make command line:
 
-LINUX_RELEASE: linux release to compile for, 2.4 (default), or 2.6.
-XENO_ROOT: root of the xen tree containing kernel source. Default '..'.
-ROOT: root path to install in, default is XENO_ROOT/install.
-      Set to '/' to install relative to filesystem root.
-KERNEL_VERSION: kernel version, default got from XENO_ROOT.
+LINUX_SERIES: linux release to compile for, 2.4 (default), or 2.6.
+XEN_ROOT: root of the xen tree containing kernel source.
+KERNEL_VERSION: kernel version, default got from XEN_ROOT.
 KERNEL_MINOR: kernel minor version, default -xen0.
-KERNEL_SRC: path to kernel source, default linux-<VERSION> under XENO_ROOT.
+KERNEL_SRC: path to kernel source, default linux-<VERSION> under XEN_ROOT.
 
 *) For 2.4 kernel
 
 To compile from scratch:
 
 make clean
-make 
+make LINUX_SERIES=2.4
 
 This will build vnet_module.o in the current directory.
 To install the module use
 
-make install
+make LINUX_SERIES=2.4 install
 
 *) For 2.6 kernel
 
 To compile from scratch:
 
 make clean
-make LINUX_RELEASE=2.6
+make
 
 This will build vnet_module.ko in the current directory.
 To install the module use
 
-make LINUX_RELEASE=2.6 install
+make install
 
 
index a9bf9afea96e4dc54efec8aa9af5ab5be447ac35..9d33c70981f1f657d86056896e46ac6cf56de4ff 100644 (file)
@@ -20,9 +20,9 @@
 
 #============================================================================
 ifeq ($(src),)
-LINUX_RELEASE ?=2.6
+LINUX_SERIES ?=2.6
 
-include Makefile-$(LINUX_RELEASE)
+include Makefile-$(LINUX_SERIES)
 
 #============================================================================
 else
index e0dad1a8c82523719b77a26ebdd82d8a9099a923..4a512aaa3b960feb17a48de4c1202f35fba09056 100644 (file)
@@ -21,6 +21,7 @@
 #============================================================================
 # Vnet module makefile for 2.4 series kernels.
 
+LINUX_SERIES ?=2.4
 include Makefile.ver
 
 KERNEL_MODULE := vnet_module.o
index a46db54da471702397d7c2c5fc4a098f17457234..698644a1f4f5cc87a788cb581588936748b269c7 100644 (file)
@@ -21,7 +21,7 @@
 #============================================================================
 # Vnet module makefile for 2.6 series kernels.
 
-LINUX_RELEASE ?= 2.6
+LINUX_SERIES ?=2.6
 include Makefile.ver
 
 KERNEL_MODULE = vnet_module.ko
index ddd3541ee319b518c2322e874b493dd3ac56aa5a..586c26ee8e6dc4a0bda9b9738c4dec2c583d89c4 100644 (file)
@@ -29,14 +29,14 @@ XEN_ROOT ?=../../..
 prefix ?=$(XEN_ROOT)/install/
 #----------------------------------------------------------------------------
 
-LINUX_RELEASE ?=2.6
+LINUX_SERIES ?=2.6
 KERNEL_MINOR ?=-xen0
 
-LINUX_VERSION ?= $(shell ( /bin/ls -ld $(XEN_ROOT)/linux-$(LINUX_RELEASE).*-xen-sparse ) 2>/dev/null | \
+LINUX_VERSION ?= $(shell ( /bin/ls -ld $(XEN_ROOT)/linux-$(LINUX_SERIES).*-xen-sparse ) 2>/dev/null | \
                       sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
 
 ifeq ($(LINUX_VERSION),)
-$(error Kernel source for linux $(LINUX_RELEASE) not found)
+$(error Kernel source for linux $(LINUX_SERIES) not found)
 endif
 
 KERNEL_VERSION =$(LINUX_VERSION)$(KERNEL_MINOR)